require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/shareA/index" ], {
    "2ef6": function(e, t, a) {
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            a("0cda"), t(a("66fd")), e(t(a("6b5a")).default);
        }).call(this, a("543d").createPage);
    },
    "6b5a": function(e, t, a) {
        a.r(t);
        var n, r = a("f4fe"), o = a("c825");
        for (n in o) "default" !== n && function(e) {
            a.d(t, e, function() {
                return o[e];
            });
        }(n);
        a("8148");
        var i = a("f0c5"), r = Object(i.a)(o.default, r.b, r.c, !1, null, null, null, !1, r.a, void 0);
        t.default = r.exports;
    },
    "7e20": function(e, t, a) {},
    8148: function(e, t, a) {
        var n = a("7e20");
        a.n(n).a;
    },
    b466: function(e, n, o) {
        (function(d) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var e, u = (e = o("a34a")) && e.__esModule ? e : {
                default: e
            };
            function c(e, t, a, n, r, o, i) {
                try {
                    var s = e[o](i), c = s.value;
                } catch (e) {
                    return a(e), 0;
                }
                s.done ? t(c) : Promise.resolve(c).then(n, r);
            }
            function t(s) {
                return function() {
                    var e = this, i = arguments;
                    return new Promise(function(t, a) {
                        var n = s.apply(e, i);
                        function r(e) {
                            c(n, t, a, r, o, "next", e);
                        }
                        function o(e) {
                            c(n, t, a, r, o, "throw", e);
                        }
                        r(void 0);
                    });
                };
            }
            var r = getApp(), a = {
                data: function() {
                    return {
                        module_name: r.globalData.module_name,
                        userinfo: d.getStorageSync("userinfo"),
                        setting: d.getStorageSync("setting"),
                        page: 1,
                        lists: [],
                        loadingType: 0,
                        swiperItems: [],
                        showAlert: !1,
                        navItems: [],
                        navIndex: 0,
                        isFixed: !1,
                        headerHeight: 100,
                        index: 1,
                        cateid: 0,
                        is_scroll: !1,
                        gutter: 40,
                        tjpText: {
                            pdd: "拼多多",
                            jd: "京东",
                            tb: "淘宝",
                            wph: "唯品会"
                        },
                        showHb: !1,
                        poster: "",
                        bg_width: 0,
                        bg_height: 0,
                        goods: [],
                        picnum: 0,
                        quan_url: "",
                        path2: ""
                    };
                },
                components: {
                    gracePage: function() {
                        o.e("graceUI/components/gracePage").then(function() {
                            return resolve(o("1021"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceLoading: function() {
                        o.e("graceUI/components/graceLoading").then(function() {
                            return resolve(o("1d04"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceEmptyNew: function() {
                        o.e("graceUI/components/graceEmptyNew").then(function() {
                            return resolve(o("f8df"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceSwiper: function() {
                        o.e("graceUI/components/graceSwiper").then(function() {
                            return resolve(o("9fc3"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    graceNavBar: function() {
                        o.e("graceUI/components/graceNavBar").then(function() {
                            return resolve(o("a631"));
                        }.bind(null, o)).catch(o.oe);
                    },
                    rCanvas: function() {
                        Promise.all([ o.e("common/vendor"), o.e("components/r-canvas/r-canvas") ]).then(function() {
                            return resolve(o("20e0"));
                        }.bind(null, o)).catch(o.oe);
                    }
                },
                props: {},
                onReady: function() {
                    var a = this;
                    return t(u.default.mark(function e() {
                        var t;
                        return u.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, a.$onLaunched;

                              case 2:
                                t = a, d.createSelectorQuery().select("#header").fields({
                                    size: !0
                                }, function(e) {
                                    e && (t.headerHeight = e.height);
                                }).exec();

                              case 4:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onPageScroll: function(e) {
                    e.scrollTop >= this.headerHeight ? this.isFixed = !0 : this.isFixed = !1;
                },
                onLoad: function(a) {
                    var n = this;
                    return t(u.default.mark(function e() {
                        var t;
                        return u.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                n.navIndex = a.type, d.setNavigationBarColor({
                                    backgroundColor: "#FFFFFF",
                                    frontColor: "#000000"
                                }), (t = n).setting = d.getStorageSync("setting"), t.userinfo = d.getStorageSync("userinfo"), 
                                d.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                }), n.loadData();

                              case 11:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                methods: {
                    taped: function(e) {
                        e = this.swiperItems[e];
                        this.openad(e);
                    },
                    openad: function(a) {
                        var e, n = this;
                        1 == a.is_warm && a.tplid ? (e = r.globalData.util.url("entry/wxapp/subscribemessage2", {
                            m: r.globalData.module_name
                        }), d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                id: a.item_id,
                                type: 2
                            },
                            success: function(e) {
                                var t;
                                d.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum), parseInt(d.getStorageSync("subscribemessage" + a.item_id)) < parseInt(a.tplid_oneday_num) ? (t = new Array(), 
                                t = a.tplid.split(","), wx.requestSubscribeMessage({
                                    tmplIds: t,
                                    success: function(e) {
                                        "reject" == e[t[0]] ? 7 != a.adtype ? n.openad2(a) : d.showToast({
                                            title: "您取消了订阅",
                                            icon: "none"
                                        }) : (e = r.globalData.util.url("entry/wxapp/subscribemessage2", {
                                            m: r.globalData.module_name
                                        }), d.request({
                                            url: e,
                                            method: "POST",
                                            header: {
                                                "content-type": "application/x-www-form-urlencoded"
                                            },
                                            data: {
                                                openid: d.getStorageSync("openid"),
                                                id: a.item_id,
                                                type: 1
                                            },
                                            success: function(e) {
                                                d.setStorageSync("subscribemessage" + a.item_id, e.data.warm_daynum), 7 != a.adtype || d.showToast({
                                                    title: "订阅成功",
                                                    icon: "none"
                                                });
                                            }
                                        }), n.openad2(a));
                                    },
                                    fail: function(e) {
                                        e.openad2(a);
                                    }
                                })) : 7 != a.adtype ? n.openad2(a) : d.showToast({
                                    title: "您已订阅",
                                    icon: "none"
                                });
                            }
                        })) : n.openad2(a);
                    },
                    openad2: function(t) {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var e, a, n = this;
                        1 == t.adtype || 14 == t.adtype || 15 == t.adtype ? 0 < t.appid_type2 || 14 == t.adtype || 15 == t.adtype ? (e = r.globalData.util.url("entry/wxapp/index_jump", {
                            m: r.globalData.module_name
                        }), d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                adid: t.item_id
                            },
                            success: function(e) {
                                1 == e.data.jump_type ? d.navigateToMiniProgram({
                                    appId: e.data.jump_appid,
                                    path: e.data.jump_path
                                }) : 2 == e.data.jump_type ? (n.contact_type = "ad_new", n.contact_id = t.item_id, 
                                n.contact_title = e.data.title, n.contact_title_text = e.data.title_text, n.contact_title_desc = e.data.title_desc, 
                                n.contact_thumb = d.getStorageSync("setting").dianwo) : d.showToast({
                                    title: e.data.msg,
                                    icon: "none"
                                }), d.hideLoading();
                            }
                        })) : (d.navigateToMiniProgram({
                            appId: t.appid,
                            path: t.path
                        }), d.hideLoading()) : 5 == t.adtype ? (d.navigateTo({
                            url: "../movieA/webview?return_url=" + encodeURIComponent(t.url) + "&t=" + Date.parse(new Date())
                        }), d.hideLoading()) : 10 == t.adtype || 11 == t.adtype || 7 == t.adtype ? d.hideLoading() : 4 == t.adtype ? (d.setStorageSync("index_nav", t.url), 
                        -1 != t.url.indexOf("../index/") || -1 != t.url.indexOf("../meituangroup/") || -1 != t.url.indexOf("../user/") || -1 != t.url.indexOf("../movie/") || -1 != t.url.indexOf("../shop/") || -1 != t.url.indexOf("../kefu/") || -1 != t.url.indexOf("../meituan/") || -1 != t.url.indexOf("../elm/") || -1 != t.url.indexOf("../mall/") ? (a = t.url.replace("../", "../../../pages/"), 
                        d.navigateTo({
                            url: a
                        })) : -1 != t.url.indexOf("../../pagesA/pages/movieA/") || -1 != t.url.indexOf("../../pagesA/pages/shopA/") || -1 != t.url.indexOf("../../pagesA/pages/mallA/") || -1 != t.url.indexOf("../../pagesA/pages/userA/") ? (a = t.url.replace("../../pagesA/pages/", "../"), 
                        d.navigateTo({
                            url: a
                        })) : d.navigateTo({
                            url: t.url
                        }), d.hideLoading(), d.hideLoading()) : 2 == t.adtype || 3 == t.adtype || 9 == t.adtype ? (e = r.globalData.util.url("entry/wxapp/api", {
                            m: r.globalData.module_name,
                            o: "ad_kefubind"
                        }), d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                adtype: "ad_new",
                                adid: t.item_id,
                                openid: d.getStorageSync("openid")
                            },
                            success: function(e) {}
                        }), this.contact_title_desc = "", this.contact_type = "ad_new", this.contact_id = t.item_id, 
                        this.contact_title = t.title, this.contact_title_text = t.title_text, this.contact_title_desc = t.title_desc, 
                        this.contact_thumb = d.getStorageSync("setting").dianwo, d.hideLoading()) : 8 == t.adtype ? 1 == t.mall_adtype ? d.navigateTo({
                            url: "../mallA/huodong?id=" + t.item_id
                        }) : 2 == t.mall_adtype && this.loadMallapigoodslist(t) : 12 == t.adtype ? (d.previewImage({
                            urls: [ t.open_thumb ]
                        }), d.hideLoading()) : 13 == t.adtype && this.getCoupon(t);
                    },
                    getgoodsHb: function(a) {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var n = this;
                        if (d.getStorageSync("poster" + a.currentTarget.dataset.id) && parseInt(d.getStorageSync("poster_num" + a.currentTarget.dataset.id)) < 2) return d.hideLoading(), 
                        d.setStorageSync("poster_num" + a.currentTarget.dataset.id, d.getStorageSync("poster_num" + a.currentTarget.dataset.id) + 1), 
                        n.poster = d.getStorageSync("poster" + a.currentTarget.dataset.id), void (n.showHb = !0);
                        n.poster = "";
                        var e = r.globalData.util.url("entry/wxapp/share_qrcode", {
                            m: r.globalData.module_name
                        });
                        d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                id: a.currentTarget.dataset.id
                            },
                            success: function(t) {
                                200 == t.data.code && d.getImageInfo({
                                    src: t.data.bg,
                                    success: function(e) {
                                        n.bg_width = e.width, n.bg_height = e.height, n.buildHb(t.data.bg, t.data.qrcode, JSON.parse(t.data.data), a.currentTarget.dataset.id);
                                    }
                                });
                            }
                        });
                    },
                    buildHb: function(n, r, o, i) {
                        var s = this;
                        this.$nextTick(t(u.default.mark(function e() {
                            var t, a;
                            return u.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return t = s, e.next = 3, s.$refs.rCanvas.init({
                                        canvas_id: "rCanvas",
                                        background_color: "#fff",
                                        canvas_width: t.bg_width,
                                        canvas_height: t.bg_height,
                                        scale: 1,
                                        hidden: !0
                                    }).catch(function(e) {
                                        s.error(e);
                                    });

                                  case 3:
                                    return e.next = 5, s.$refs.rCanvas.drawImage({
                                        url: n,
                                        x: 0,
                                        y: 0,
                                        w: t.bg_width,
                                        h: t.bg_height
                                    }).catch(function(e) {
                                        s.error(e);
                                    });

                                  case 5:
                                    a = 0;

                                  case 6:
                                    if (!(a < o.length)) {
                                        e.next = 29;
                                        break;
                                    }
                                    if (console.log(o[a].type), "qr" == o[a].type || "xcxqr" == o[a].type) return e.next = 11, 
                                    s.$refs.rCanvas.drawImage({
                                        url: r,
                                        x: 2 * o[a].left.replace("px", ""),
                                        y: 2 * o[a].top.replace("px", ""),
                                        w: 2 * o[a].width.replace("px", ""),
                                        h: 2 * o[a].height.replace("px", "")
                                    }).catch(function(e) {
                                        s.error(e);
                                    });
                                    e.next = 13;
                                    break;

                                  case 11:
                                    e.next = 26;
                                    break;

                                  case 13:
                                    if ("img" == o[a].type) return e.next = 16, s.$refs.rCanvas.drawImage({
                                        url: t.setting.attachurl + o[a].src,
                                        x: 2 * o[a].left.replace("px", ""),
                                        y: 2 * o[a].top.replace("px", ""),
                                        w: 2 * o[a].width.replace("px", ""),
                                        h: 2 * o[a].height.replace("px", "")
                                    }).catch(function(e) {
                                        s.error(e);
                                    });
                                    e.next = 18;
                                    break;

                                  case 16:
                                    e.next = 26;
                                    break;

                                  case 18:
                                    if ("nickname" == o[a].type) return e.next = 21, s.$refs.rCanvas.drawText({
                                        text: t.userinfo.nickname,
                                        x: 2 * o[a].left.replace("px", ""),
                                        y: 2 * o[a].top.replace("px", ""),
                                        max_width: 300,
                                        font_size: 2 * o[a].size.replace("px", ""),
                                        line_height: 2 * o[a].size.replace("px", "") + 4,
                                        line_clamp: 1,
                                        font_color: o[a].color
                                    }).catch(function(e) {
                                        s.error(e);
                                    });
                                    e.next = 23;
                                    break;

                                  case 21:
                                    e.next = 26;
                                    break;

                                  case 23:
                                    if ("head" == o[a].type) return e.next = 26, s.$refs.rCanvas.drawImage({
                                        url: t.userinfo.avatar,
                                        x: 2 * o[a].left.replace("px", ""),
                                        y: 2 * o[a].top.replace("px", ""),
                                        w: 2 * o[a].width.replace("px", ""),
                                        h: 2 * o[a].height.replace("px", "")
                                    }).catch(function(e) {
                                        s.error(e);
                                    });
                                    e.next = 26;
                                    break;

                                  case 26:
                                    a++, e.next = 6;
                                    break;

                                  case 29:
                                    return e.next = 31, s.$refs.rCanvas.draw(function(e) {
                                        d.hideLoading(), d.setStorageSync("poster" + i, e.tempFilePath), d.setStorageSync("poster_num" + i, 0), 
                                        s.poster = e.tempFilePath, s.showHb = !0;
                                    }).catch(function(e) {
                                        s.error(e);
                                    });

                                  case 31:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        })));
                    },
                    getgoodsHb3: function(t) {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        });
                        var a = this;
                        if (d.getStorageSync("poster" + t.currentTarget.dataset.id) && parseInt(d.getStorageSync("poster_num" + t.currentTarget.dataset.id)) < 2) return d.hideLoading(), 
                        d.setStorageSync("poster_num" + t.currentTarget.dataset.id, d.getStorageSync("poster_num" + t.currentTarget.dataset.id) + 1), 
                        a.poster = d.getStorageSync("poster" + t.currentTarget.dataset.id), void (a.showHb = !0);
                        a.poster = "";
                        var e = r.globalData.util.url("entry/wxapp/mall_goods_qrcode", {
                            m: r.globalData.module_name
                        });
                        d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                goodsid: t.currentTarget.dataset.goods.goods_id,
                                pingtai: t.currentTarget.dataset.goods.pingtai,
                                goodssign: t.currentTarget.dataset.goods.goods_sign,
                                photo: t.currentTarget.dataset.goods.photos[0],
                                posterid: t.currentTarget.dataset.id
                            },
                            success: function(e) {
                                200 == e.data.code && (a.goods = t.currentTarget.dataset.goods, a.buildHb3(e.data.photo, e.data.qrcode, t.currentTarget.dataset.id));
                            }
                        });
                    },
                    buildHb3: function(a, n, r) {
                        var o = this, i = "          ", s = 60, c = "券后￥", e = this.tjpText[this.goods.pingtai].replace(/[\u0391-\uFFE5]/g, "a").length;
                        3 == e ? (i = "             ", s = 92) : 4 == e && (i = "                 ", s = 124), 
                        "wph" == this.goods.pingtai && 0 == this.goods.quan_discount ? c = "折后￥" : 0 == this.goods.quan_discount && (c = "Vip价￥"), 
                        this.$nextTick(t(u.default.mark(function e() {
                            var t;
                            return u.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return t = o, e.next = 3, o.$refs.rCanvas.init({
                                        canvas_id: "rCanvas",
                                        background_color: "#fff",
                                        canvas_width: 540,
                                        canvas_height: 960,
                                        scale: 1,
                                        hidden: !0
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 3:
                                    return e.next = 5, o.$refs.rCanvas.drawImage({
                                        url: a,
                                        x: 0,
                                        y: 0,
                                        w: 540,
                                        h: 540
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 5:
                                    return e.next = 7, o.$refs.rCanvas.drawRect({
                                        w: s,
                                        h: 32,
                                        x: 20,
                                        y: 550,
                                        color: "red",
                                        font_size: 32,
                                        border_radius: 5
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 7:
                                    return e.next = 9, o.$refs.rCanvas.drawText({
                                        text: t.tjpText[t.goods.pingtai],
                                        x: 22,
                                        y: 575,
                                        font_size: 28,
                                        font_color: "rgba(255,255,255,1)"
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 9:
                                    return e.next = 11, o.$refs.rCanvas.drawText({
                                        text: i + t.goods.title,
                                        x: 20,
                                        y: 577,
                                        max_width: 500,
                                        font_size: 28,
                                        line_height: 32,
                                        line_clamp: 3,
                                        font_color: "black"
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 11:
                                    return e.next = 13, o.$refs.rCanvas.drawImage({
                                        url: n,
                                        x: 295,
                                        y: 680,
                                        w: 200,
                                        h: 200
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 13:
                                    return e.next = 15, o.$refs.rCanvas.drawSpecialText({
                                        general: {
                                            x: 20,
                                            y: 720
                                        },
                                        list: [ {
                                            text: c,
                                            font_color: "red",
                                            font_size: 24
                                        }, {
                                            text: t.goods.final_price,
                                            font_color: "red",
                                            font_size: 32
                                        } ]
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 15:
                                    return e.next = 17, o.$refs.rCanvas.drawSpecialText({
                                        general: {
                                            x: 20,
                                            y: 770
                                        },
                                        list: [ {
                                            text: "原价￥" + t.goods.price,
                                            font_color: "#999999",
                                            font_size: 24,
                                            line_through_height: 1,
                                            line_through_color: "#999999"
                                        } ]
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 17:
                                    if (0 < o.goods.quan_discount) return e.next = 20, o.$refs.rCanvas.drawRect({
                                        w: 190,
                                        h: 50,
                                        x: 20,
                                        y: 820,
                                        color: "#ff9a1e",
                                        border_radius: 50
                                    }).catch(function(e) {
                                        o.error(e);
                                    });
                                    e.next = 22;
                                    break;

                                  case 20:
                                    return e.next = 22, o.$refs.rCanvas.drawText({
                                        text: t.goods.quan_discount + "元优惠券",
                                        x: 45,
                                        y: 855,
                                        font_size: 28,
                                        font_color: "rgba(255,255,255,1)"
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 22:
                                    return e.next = 24, o.$refs.rCanvas.drawText({
                                        text: "长按识别发现好货",
                                        x: 310,
                                        y: 910,
                                        font_size: 22,
                                        font_color: "#999999"
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 24:
                                    return e.next = 26, o.$refs.rCanvas.draw(function(e) {
                                        d.hideLoading(), d.setStorageSync("poster" + r, e.tempFilePath), d.setStorageSync("poster_num" + r, 0), 
                                        o.poster = e.tempFilePath, o.showHb = !0;
                                    }).catch(function(e) {
                                        o.error(e);
                                    });

                                  case 26:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        })));
                    },
                    previewImage: function() {
                        d.previewImage({
                            urls: [ this.poster ],
                            current: 0
                        });
                    },
                    saveImage: function() {
                        d.saveImageToPhotosAlbum({
                            filePath: this.poster,
                            success: function() {
                                d.showToast({
                                    title: "保存成功",
                                    icon: "success"
                                });
                            }
                        });
                    },
                    savepic: function(t) {
                        0 < parseInt(t.currentTarget.dataset.shop_id) ? 1 == d.getStorageSync("showsavepic") ? d.previewImage({
                            urls: t.currentTarget.dataset.goods_photos
                        }) : d.showModal({
                            title: "提示",
                            content: "请长按图片保存",
                            confirmText: "知道了",
                            showCancel: !1,
                            success: function(e) {
                                d.setStorageSync("showsavepic", 1), e.confirm && d.previewImage({
                                    urls: t.currentTarget.dataset.goods_photos
                                });
                            }
                        }) : this.savepics(t.currentTarget.dataset.goods_photos, 0);
                    },
                    savepics: function(t, a) {
                        var n = this;
                        d.getImageInfo({
                            src: t[a],
                            success: function(e) {
                                d.saveImageToPhotosAlbum({
                                    filePath: e.path,
                                    success: function() {
                                        n.picnum = a + 1, d.showToast({
                                            title: "已保存" + n.picnum + "/" + t.length,
                                            icon: "success",
                                            duration: 2e3
                                        }), a < t.length ? (a++, n.savepics(t, a)) : d.hideToast();
                                    },
                                    fail: function() {
                                        d.showModal({
                                            title: "提示",
                                            content: "请开启保存相册权限",
                                            showCancel: !0,
                                            success: function(e) {
                                                e.confirm && n.again_PhotosAlbum(), d.hideLoading();
                                            }
                                        });
                                    }
                                });
                            }
                        });
                    },
                    again_PhotosAlbum: function() {
                        d.getSetting({
                            success: function(e) {
                                null != e.authSetting["scope.writePhotosAlbum"] && 1 != e.authSetting["scope.writePhotosAlbum"] && d.showModal({
                                    title: "是否开启保存相册权限",
                                    content: "需要获取您的相册权限，请确认授权，否则无法保存图片",
                                    success: function(e) {
                                        e.cancel ? d.showToast({
                                            title: "授权失败",
                                            icon: "success",
                                            duration: 1e3
                                        }) : e.confirm && d.openSetting({
                                            success: function(e) {
                                                1 == e.authSetting["scope.writePhotosAlbum"] ? d.showToast({
                                                    title: "授权成功",
                                                    icon: "success",
                                                    duration: 2e3
                                                }) : d.showToast({
                                                    title: "授权失败",
                                                    icon: "error",
                                                    duration: 2e3
                                                });
                                            }
                                        });
                                    }
                                });
                            }
                        });
                    },
                    close: function() {
                        this.showHb = !1;
                    },
                    change: function(e) {
                        d.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), this.navIndex = e, this.page = 1, this.lists = [], this.loadingType = 0, this.index = 0, 
                        this.loadData();
                    },
                    opengoods: function(e) {
                        d.navigateTo({
                            url: "../mallA/detail?pt=" + e.currentTarget.dataset.goods.pingtai + "&goodsid=" + e.currentTarget.dataset.goods.goods_id + "&goodssign=" + e.currentTarget.dataset.goods.goods_sign
                        });
                    },
                    copy: function(t) {
                        var e;
                        t.currentTarget.dataset.item.goods_id ? (d.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), d.getStorageSync("quan_url" + t.currentTarget.dataset.item.id) ? (d.setClipboardData({
                            data: t.currentTarget.dataset.content + "\n-------------------\n【下单链接】" + d.getStorageSync("quan_url" + t.currentTarget.dataset.item.id),
                            success: function(e) {
                                d.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        }), d.hideLoading()) : (e = r.globalData.util.url("entry/wxapp/mall_goods_getcoupon", {
                            m: r.globalData.module_name
                        }), d.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: d.getStorageSync("openid"),
                                goodsid: t.currentTarget.dataset.item.goods_id,
                                pingtai: t.currentTarget.dataset.item.mall_type,
                                goodssign: t.currentTarget.dataset.item.goods.goods_sign,
                                quan_url: t.currentTarget.dataset.item.goods.quan_url
                            },
                            success: function(e) {
                                200 == e.data.code && ("tb" == t.currentTarget.dataset.pingtai ? (d.setStorageSync("quan_url" + t.currentTarget.dataset.item.id, e.data.quan_url), 
                                d.setClipboardData({
                                    data: t.currentTarget.dataset.content + "\n-------------------\n【下单链接】" + d.getStorageSync("quan_url" + t.currentTarget.dataset.item.id),
                                    success: function(e) {
                                        d.showToast({
                                            title: "复制成功",
                                            icon: "none"
                                        });
                                    }
                                }), d.setStorageSync("pid_time", e.data.pid_time), d.getStorageSync("pid_time") != d.getStorageSync("pid_use_time") && d.setStorageSync("pid_use_time", d.getStorageSync("pid_time"))) : (d.setStorageSync("quan_url" + t.currentTarget.dataset.item.id, e.data.quan_url), 
                                d.setClipboardData({
                                    data: t.currentTarget.dataset.content + "\n-------------------\n【下单链接】" + d.getStorageSync("quan_url" + t.currentTarget.dataset.item.id),
                                    success: function(e) {
                                        d.showToast({
                                            title: "复制成功",
                                            icon: "none"
                                        });
                                    }
                                })), d.hideLoading());
                            }
                        }))) : d.setClipboardData({
                            data: t.currentTarget.dataset.content,
                            success: function(e) {
                                d.showToast({
                                    title: "复制成功",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    loadData: function() {
                        var t = this, e = r.globalData.util.url("entry/wxapp/shareindex", {
                            m: r.globalData.module_name
                        });
                        this.loadingType = 1, d.request({
                            url: e,
                            data: {
                                index: t.index,
                                page: t.page,
                                cateid: t.navIndex,
                                openid: d.getStorageSync("openid"),
                                system_type: d.getStorageSync("systemtype")
                            },
                            success: function(e) {
                                1 == e.data.syn && t.loadData_syn(), 1 == t.index && (t.sharetitle = e.data.sharetitle, 
                                t.sharepic = e.data.sharepic, t.swiperItems = e.data.lunbo, t.navItems = e.data.daohang, 
                                4 < t.navItems.length && (t.is_scroll = !0, 5 == t.navItems.length ? t.gutter = 40 : t.gutter = 30)), 
                                t.tjpText = e.data.poster_area_text, t.index = 0, t.loadingType = 0, t.page = t.page + 1, 
                                t.lists = t.lists.concat(e.data.shares), e.data.total < t.page && (0 == t.lists.length ? t.loadingType = 4 : t.loadingType = 2), 
                                d.hideLoading();
                            }
                        });
                    },
                    loadData_syn: function() {
                        var e = r.globalData.util.url("entry/wxapp/shareindex_syn", {
                            m: r.globalData.module_name
                        });
                        d.request({
                            url: e,
                            data: {
                                openid: d.getStorageSync("openid")
                            },
                            success: function(e) {}
                        });
                    },
                    previewPhoto: function(e) {
                        var t = e.currentTarget.dataset.feedindex, e = e.currentTarget.dataset.imgindex;
                        d.previewImage({
                            urls: this.lists[t].goods_photos,
                            current: this.lists[t].goods_photos[e]
                        });
                    },
                    onShareAppMessage: function() {
                        var e = "pagesA/pages/shareA/index?uid=" + d.getStorageSync("userinfo").user_id;
                        return {
                            title: this.sharetitle,
                            imageUrl: this.sharepic,
                            path: e
                        };
                    },
                    onReachBottom: function() {
                        1 != this.loadingType && 2 != this.loadingType && this.loadData();
                    },
                    onPullDownRefresh: function() {
                        this.lists = [], this.page = 1, this.goods_id = 0, this.loadingType = 0, this.loadData();
                    }
                }
            };
            n.default = a;
        }).call(this, o("543d").default);
    },
    c825: function(e, t, a) {
        a.r(t);
        var n, r = a("b466"), o = a.n(r);
        for (n in r) "default" !== n && function(e) {
            a.d(t, e, function() {
                return r[e];
            });
        }(n);
        t.default = o.a;
    },
    f4fe: function(e, t, a) {
        a.d(t, "b", function() {
            return r;
        }), a.d(t, "c", function() {
            return o;
        }), a.d(t, "a", function() {
            return n;
        });
        var n = {
            uTabs: function() {
                return a.e("uview-ui/components/u-tabs/u-tabs").then(a.bind(null, "8945"));
            },
            rCanvas: function() {
                return Promise.all([ a.e("common/vendor"), a.e("components/r-canvas/r-canvas") ]).then(a.bind(null, "20e0"));
            },
            uPopup: function() {
                return a.e("uview-ui/components/u-popup/u-popup").then(a.bind(null, "2904"));
            },
            uImage: function() {
                return a.e("uview-ui/components/u-image/u-image").then(a.bind(null, "871d"));
            }
        }, r = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    }
}, [ [ "2ef6", "common/runtime", "common/vendor" ] ] ]);